﻿<%@ Page Title="Lista de Contatos" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Contato.aspx.cs" Inherits="Follow.Cadastros.Contato" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:MultiView ID="mvContatos" runat="server" ActiveViewIndex="0">
        <asp:View ID="View1" runat="server">
            <div class="Titulo">
                <%: Title %>
            </div>
            <asp:Image ID="Image2" runat="server" ImageUrl="~/images/linhas_17.png" />
            <br />
            <div class="Label">
                <asp:Label ID="lblMsgSucesso" runat="server" /><br />
                <br />
            </div>
             <br />
            <center>
            <asp:Label ID="lblPesquisa" Text="Pesquisa:" runat="server" /><br />
            <asp:TextBox ID="txtPesquisa" runat="server" Width="300px" /><br />
            <asp:Button ID="btnPesquisa" runat="server" Text="Pesquisar" OnClick="btnPesquisa_Click" CssClass="Botao" />
            <asp:Button ID="btnIncluir" runat="server" Text="Incluir" OnClick="btnIncluir_Click" CssClass="Botao"/><br />
            </center>
            <br />
            <br />
            <asp:GridView ID="gvContatos" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                DataKeyNames="IDContato" OnRowCommand="gvContatos_RowCommand"  Width="765px"
                BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" 
                CellPadding="4" ForeColor="Black" GridLines="Vertical" 
                onselectedindexchanged="gvContatos_SelectedIndexChanged">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:BoundField HeaderText="Nome" DataField="Nome" />
                    <asp:BoundField HeaderText="Depto" DataField="Depto" />
                    <asp:BoundField HeaderText="Email" DataField="Email" />
                    <asp:ButtonField ButtonType="image" ImageUrl="~/Images/editar.png" CommandName="Editar"
                        HeaderText="Editar" ItemStyle-HorizontalAlign="Center" />
                    <asp:TemplateField HeaderText="Excluir" ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <asp:ImageButton ID="btnExcluir" CommandName="Excluir" ImageUrl="~/Images/excluir.png"
                             runat="server" OnClientClick="return confirm('Tem certeza que deseja excluir?';"/>
                        </ItemTemplate>
                    </asp:TemplateField>

                </Columns>
                <FooterStyle BackColor="#CCCC99" />
                <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                <RowStyle BackColor="#F7F7DE" />
                <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                <SortedAscendingCellStyle BackColor="#FBFBF2" />
                <SortedAscendingHeaderStyle BackColor="#848384" />
                <SortedDescendingCellStyle BackColor="#EAEAD3" />
                <SortedDescendingHeaderStyle BackColor="#575357" />
            </asp:GridView>
        </asp:View>
        <asp:View ID="View2" runat="server">
            <div class="Titulo">
                <%: Title %>
            </div>
            <asp:Image ID="Image1" runat="server" ImageUrl="~/images/linhas_17.png" />
            <br />
            <div class="Label">
                <asp:Label ID="Label1" runat="server" /><br />
                <br />
            </div>
            <br />
            <asp:Label ID="lblErro" runat="server" CssClass="cssErro" /><br />
            <br />
            <asp:HiddenField ID="IDContato" runat="server" />
            <asp:Label ID="lblNome" runat="server" Text="Nome:" />
                       <br />
            <asp:TextBox ID="txtNome" runat="server" />
             <asp:RequiredFieldValidator ID="rfvNome" runat="server" ErrorMessage="* Campo Nome não preenchido." ForeColor="Red"
                                        ControlToValidate="txtNome" Font-Size="X-Small"></asp:RequiredFieldValidator>
            <br />
            <br />
            <asp:Label ID="lblDepto" runat="server" Text="Departamento:" />
            <br />
            <asp:TextBox ID="txtDepto" runat="server" />
             <asp:RequiredFieldValidator ID="rfvDepto" runat="server" ErrorMessage="* Campo Departamento não preenchido." ForeColor="Red"
                                        ControlToValidate="txtDepto" Font-Size="X-Small"></asp:RequiredFieldValidator>
            <br />
            <br />
            <asp:Label ID="lblEmail" runat="server" Text="Email:" />
            <br />
            <asp:TextBox ID="txtEmail" runat="server" />
             <asp:RequiredFieldValidator ID="rfvEmail" runat="server" ErrorMessage="* Campo Email não preenchido." ForeColor="Red"
                                        ControlToValidate="txtEmail" Font-Size="X-Small"></asp:RequiredFieldValidator>
            <br />
            <br />
            <asp:Label ID="lblTel1" runat="server" Text="Tel 1:" />
            <br />
            <asp:TextBox ID="txtTel1" runat="server" />
             <asp:RequiredFieldValidator ID="rfvTel1" runat="server" ErrorMessage="* Campo Tel 1 não preenchido." ForeColor="Red"
                                        ControlToValidate="txtTel1" Font-Size="X-Small"></asp:RequiredFieldValidator>

            <br />
            <br />

            <asp:Label ID="lblTel2" runat="server" Text="Tel 2:" />
            <br />
            <asp:TextBox ID="txtTel2" runat="server" />
             <asp:RequiredFieldValidator ID="rfvTel2" runat="server" ErrorMessage="* Campo Tel 2 não preenchido." ForeColor="Red"
                                        ControlToValidate="txtTel2" Font-Size="X-Small"></asp:RequiredFieldValidator>

            <br />
            <br />

            <asp:Label ID="lblTel3" runat="server" Text="Tel 3:" />
            <br />
            <asp:TextBox ID="txtTel3" runat="server" />
             <asp:RequiredFieldValidator ID="rfvTel3" runat="server" ErrorMessage="* Campo Tel 3 não preenchido." ForeColor="Red"
                                        ControlToValidate="txtTel3" Font-Size="X-Small"></asp:RequiredFieldValidator>

            <br />
            <br />
            <asp:Label ID="lblClientes" runat="server" Text="Clientes:" />
            <br />
            <asp:DropDownList ID="ddlClientes" runat="server">
            </asp:DropDownList>
            <br />
            <br />
            <asp:Button ID="btnSalvar" runat="server" Text="Salvar" OnClick="btnSalvar_Click" CssClass="Botao"/>
            <asp:Button ID="btnVoltar" runat="server" Text="Voltar" OnClick="btnVoltar_Click" CssClass="Botao" CausesValidation="false"/>
            <br />
        </asp:View>
    </asp:MultiView>
</asp:Content>

